import Dict from '@/class/Dict/index'

const dictObj = {
  belongToOptions: [
    {
      label: '资源方产权',
      value: '2'
    },
    {
      label: '自有产权',
      value: '1'
    }
  ]
}
const filterConfig = [
  {
    type: 'dict',
    key: 'serverRoomId',
    options: [],
    dict: dictObj,
    optionsRequest: {
      url: '/api/v1/server-room',
      method: 'get',
      params: {
        pageIndex: 1,
        pageSize: 1000
      }
    },
    optionsKey: {
      label: ['id', 'code'],
      value: 'id'
    },
    optionsDivision: {
      label: '-'
    }
  },
  {
    type: 'dict',
    key: 'customerId',
    options: [],
    icons: Dict.getCustomers(),
    dict: dictObj,
    optionsRequest: {
      url: '/api/v1/customer',
      method: 'get'
    },
    optionsKey: {
      label: 'name',
      value: 'id'
    }
  },
  {
    type: 'dict',
    key: 'chargeStatus',
    dict: dictObj,
    placeholder: '请选择',
    options: [
      {
        value: '1',
        label: '未入库'
      },
      {
        value: '2',
        label: '已入库计费'
      }
    ]
  },
  {
    type: 'dict',
    key: 'isp',
    dict: dictObj,
    options: [],
    optionsRequest: {
      url: '/api/v1/dict-data/option-select?dictType=isp_type',
      method: 'get'
    },
    optionsKey: {
      label: 'label',
      value: 'value'
    }
  },
  {
    type: 'dict',
    key: 'networkType',
    dict: dictObj,
    options: [],
    optionsRequest: {
      url: '/api/v1/dict-data/option-select?dictType=network_type',
      method: 'get'
    },
    optionsKey: {
      label: 'label',
      value: 'value'
    }
  },
  {
    type: 'dict',
    key: 'serverStatus',
    dict: dictObj,
    options: [],
    optionsRequest: {
      url: '/api/v1/dict-data/option-select?dictType=server_status',
      method: 'get'
    },
    optionsKey: {
      label: 'label',
      value: 'value'
    }
  },
  {
    type: 'dict',
    key: 'ispType',
    dict: dictObj,
    options: [],
    optionsRequest: {
      url: '/api/v1/dict-data/option-select?dictType=isp_type',
      method: 'get'
    },
    optionsKey: {
      label: 'label',
      value: 'value'
    }
  },
  {
    type: 'dict',
    key: 'natType',
    dict: dictObj,
    options: [],
    optionsRequest: {
      url: '/api/v1/dict-data/option-select?dictType=nat_type',
      method: 'get'
    },
    optionsKey: {
      label: 'label',
      value: 'value'
    }
  },
  {
    type: 'dict',
    key: 'chargeType',
    dict: dictObj,
    options: [],
    optionsRequest: {
      url: '/api/v1/dict-data/option-select?dictType=charge_type',
      method: 'get'
    },
    optionsKey: {
      label: 'label',
      value: 'value'
    }
  }
]

export { filterConfig, dictObj }
